<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/js3/jQuery-2.1.4/jquery-2.1.4.min.js"></script>
    <script>
       $(function () {
           var $c=$('#cities');
           var $p=$('#provinces');
           $.get('/getProvinces',function (data) {
               console.log(data);
               data.forEach(function (value) {
                   $p.append('<option value="'+value.id+'">'+value.name+'</option>');
               })
           })
           $p.change(function () {
               var p=$(this).val();
               $c.empty();
               $c.append('<option value="-1">请选择</option>');
               if(p>0){
                   $.get('/getCities.do',{provicedId:p},function (data) {
                       data.forEach(function (value) {
                           $c.append('<option value="'+value.id+'">'+value.name+'</option>');
                       })
                   })
               }
           })

       })
    </script>
</head>
<body>
省份<select id="provinces">
    <option value="-1">请选择</option>
</select>
城市<select id="cities">
    <option value="-1">请选择</option>
</select>
</body>
</html>